<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>knet: E:/knet-git/knet/knet/ringbuffer.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">knet
   &#160;<span id="projectnumber">1.4.5</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="modules.html"><span>模块</span></a></li>
      <li><a href="annotated.html"><span>结构体</span></a></li>
      <li class="current"><a href="files.html"><span>文件</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>文件列表</span></a></li>
      <li><a href="globals.html"><span>全局定义</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_885cc87fac2d91e269af0a5a959fa5f6.html">E:</a></li><li class="navelem"><a class="el" href="dir_4e74998c9a9305a116abc25fcf9a1edb.html">knet-git</a></li><li class="navelem"><a class="el" href="dir_a1c045b39f32066568ae964b52db514f.html">knet</a></li><li class="navelem"><a class="el" href="dir_f76d03789f0b12416cfffea59e2ed47d.html">knet</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">ringbuffer.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="a00092.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright (c) 2014-2015, dennis wang</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * All rights reserved.</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * </span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * Redistribution and use in source and binary forms, with or without</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * modification, are permitted provided that the following conditions are met:</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> *     * Redistributions of source code must retain the above copyright</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> *       notice, this list of conditions and the following disclaimer.</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> *     * Redistributions in binary form must reproduce the above copyright</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> *       notice, this list of conditions and the following disclaimer in the</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> *       documentation and/or other materials provided with the distribution.</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * </span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot; AND</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"> * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#ifndef RINGBUFFER_H</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#define RINGBUFFER_H</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="a00056.html">config.h</a>&quot;</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<a class="code" href="a00034.html">kringbuffer_t</a>* <a class="code" href="a00092_a81244fe21f0b4fdcf45e66ae6257afaf.html#a81244fe21f0b4fdcf45e66ae6257afaf">ringbuffer_create</a>(uint32_t size);</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00092_aa6135df0cc9bc827cae301626898dace.html#aa6135df0cc9bc827cae301626898dace">ringbuffer_destroy</a>(<a class="code" href="a00034.html">kringbuffer_t</a>* rb);</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;uint32_t <a class="code" href="a00092_acccb44d353cc569d1f39cf01125c88bf.html#acccb44d353cc569d1f39cf01125c88bf">ringbuffer_read</a>(<a class="code" href="a00034.html">kringbuffer_t</a>* rb, <span class="keywordtype">char</span>* buffer, uint32_t size);</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;uint32_t <a class="code" href="a00092_a89fdbed1466be114d8200405db2e18a5.html#a89fdbed1466be114d8200405db2e18a5">ringbuffer_copy</a>(<a class="code" href="a00034.html">kringbuffer_t</a>* rb, <span class="keywordtype">char</span>* buffer, uint32_t size);</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;uint32_t <a class="code" href="a00092_aecd5c166ce42982ee434172cc555787d.html#aecd5c166ce42982ee434172cc555787d">ringbuffer_available</a>(<a class="code" href="a00034.html">kringbuffer_t</a>* rb);</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a00092_ab74775801f1ad149ac0beb37336f92e3.html#ab74775801f1ad149ac0beb37336f92e3">ringbuffer_eat_all</a>(<a class="code" href="a00034.html">kringbuffer_t</a>* rb);</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a00092_a1ee13a66a33b0d5648d7c95b48bd6536.html#a1ee13a66a33b0d5648d7c95b48bd6536">ringbuffer_eat</a>(<a class="code" href="a00034.html">kringbuffer_t</a>* rb, uint32_t size);</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;uint32_t <a class="code" href="a00092_a4bd33ec2ce3cba490a6166c5eac88f5c.html#a4bd33ec2ce3cba490a6166c5eac88f5c">ringbuffer_read_lock_size</a>(<a class="code" href="a00034.html">kringbuffer_t</a>* rb);</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;<span class="keywordtype">char</span>* <a class="code" href="a00092_a51fd16b89396cbe6a3e4cf3d41b4dda5.html#a51fd16b89396cbe6a3e4cf3d41b4dda5">ringbuffer_read_lock_ptr</a>(<a class="code" href="a00034.html">kringbuffer_t</a>* rb);</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00092_a5d0caeccb61acafaa4c5148b697dd927.html#a5d0caeccb61acafaa4c5148b697dd927">ringbuffer_read_commit</a>(<a class="code" href="a00034.html">kringbuffer_t</a>* rb, uint32_t size);</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;uint32_t <a class="code" href="a00092_ae50358352ded17ea670e926a59250cd0.html#ae50358352ded17ea670e926a59250cd0">ringbuffer_window_read_lock_size</a>(<a class="code" href="a00034.html">kringbuffer_t</a>* rb);</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;<span class="keywordtype">char</span>* <a class="code" href="a00092_ad11b70346a4c8b62b21b04d5b064aab4.html#ad11b70346a4c8b62b21b04d5b064aab4">ringbuffer_window_read_lock_ptr</a>(<a class="code" href="a00034.html">kringbuffer_t</a>* rb);</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00092_a97a9944a61a5323f80fb07f0fa4d8ff5.html#a97a9944a61a5323f80fb07f0fa4d8ff5">ringbuffer_window_read_commit</a>(<a class="code" href="a00034.html">kringbuffer_t</a>* rb, uint32_t size);</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;uint32_t <a class="code" href="a00092_aa5b19df813e8df494a77c9a849ebffdd.html#aa5b19df813e8df494a77c9a849ebffdd">ringbuffer_write_lock_size</a>(<a class="code" href="a00034.html">kringbuffer_t</a>* rb);</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;<span class="keywordtype">char</span>* <a class="code" href="a00092_af34961f27369651af41a96f736a813af.html#af34961f27369651af41a96f736a813af">ringbuffer_write_lock_ptr</a>(<a class="code" href="a00034.html">kringbuffer_t</a>* rb);</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;<span class="keywordtype">void</span> <a class="code" href="a00092_a92305d9585adf8fe35c059b04f635d30.html#a92305d9585adf8fe35c059b04f635d30">ringbuffer_write_commit</a>(<a class="code" href="a00034.html">kringbuffer_t</a>* rb, uint32_t size);</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a00092_a49e8fe0e7125070f1ff2bb05ea31b5f0.html#a49e8fe0e7125070f1ff2bb05ea31b5f0">ringbuffer_full</a>(<a class="code" href="a00034.html">kringbuffer_t</a>* rb);</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a00092_a3c08364c473757fa8f33fc6a99ce7091.html#a3c08364c473757fa8f33fc6a99ce7091">ringbuffer_empty</a>(<a class="code" href="a00034.html">kringbuffer_t</a>* rb);</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;uint32_t <a class="code" href="a00092_a2862a8ab39436df6e7db4f6e7f23acf2.html#a2862a8ab39436df6e7db4f6e7f23acf2">ringbuffer_get_max_size</a>(<a class="code" href="a00034.html">kringbuffer_t</a>* rb);</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* RINGBUFFER_H */</span><span class="preprocessor"></span></div>
<div class="ttc" id="a00056_html"><div class="ttname"><a href="a00056.html">config.h</a></div></div>
<div class="ttc" id="a00092_a3c08364c473757fa8f33fc6a99ce7091_html_a3c08364c473757fa8f33fc6a99ce7091"><div class="ttname"><a href="a00092_a3c08364c473757fa8f33fc6a99ce7091.html#a3c08364c473757fa8f33fc6a99ce7091">ringbuffer_empty</a></div><div class="ttdeci">int ringbuffer_empty(kringbuffer_t *rb)</div><div class="ttdoc">空 </div><div class="ttdef"><b>Definition:</b> ringbuffer.c:235</div></div>
<div class="ttc" id="a00092_aa6135df0cc9bc827cae301626898dace_html_aa6135df0cc9bc827cae301626898dace"><div class="ttname"><a href="a00092_aa6135df0cc9bc827cae301626898dace.html#aa6135df0cc9bc827cae301626898dace">ringbuffer_destroy</a></div><div class="ttdeci">void ringbuffer_destroy(kringbuffer_t *rb)</div><div class="ttdoc">销毁ringbuffer </div><div class="ttdef"><b>Definition:</b> ringbuffer.c:115</div></div>
<div class="ttc" id="a00092_aecd5c166ce42982ee434172cc555787d_html_aecd5c166ce42982ee434172cc555787d"><div class="ttname"><a href="a00092_aecd5c166ce42982ee434172cc555787d.html#aecd5c166ce42982ee434172cc555787d">ringbuffer_available</a></div><div class="ttdeci">uint32_t ringbuffer_available(kringbuffer_t *rb)</div><div class="ttdoc">取得可读字节数 </div><div class="ttdef"><b>Definition:</b> ringbuffer.c:110</div></div>
<div class="ttc" id="a00092_ad11b70346a4c8b62b21b04d5b064aab4_html_ad11b70346a4c8b62b21b04d5b064aab4"><div class="ttname"><a href="a00092_ad11b70346a4c8b62b21b04d5b064aab4.html#ad11b70346a4c8b62b21b04d5b064aab4">ringbuffer_window_read_lock_ptr</a></div><div class="ttdeci">char * ringbuffer_window_read_lock_ptr(kringbuffer_t *rb)</div><div class="ttdoc">虚拟窗口 - 取得可读数据起止指针 </div><div class="ttdef"><b>Definition:</b> ringbuffer.c:179</div></div>
<div class="ttc" id="a00092_a4bd33ec2ce3cba490a6166c5eac88f5c_html_a4bd33ec2ce3cba490a6166c5eac88f5c"><div class="ttname"><a href="a00092_a4bd33ec2ce3cba490a6166c5eac88f5c.html#a4bd33ec2ce3cba490a6166c5eac88f5c">ringbuffer_read_lock_size</a></div><div class="ttdeci">uint32_t ringbuffer_read_lock_size(kringbuffer_t *rb)</div><div class="ttdoc">取得非绕回连续地址的最大可读字节数 </div><div class="ttdef"><b>Definition:</b> ringbuffer.c:121</div></div>
<div class="ttc" id="a00092_a51fd16b89396cbe6a3e4cf3d41b4dda5_html_a51fd16b89396cbe6a3e4cf3d41b4dda5"><div class="ttname"><a href="a00092_a51fd16b89396cbe6a3e4cf3d41b4dda5.html#a51fd16b89396cbe6a3e4cf3d41b4dda5">ringbuffer_read_lock_ptr</a></div><div class="ttdeci">char * ringbuffer_read_lock_ptr(kringbuffer_t *rb)</div><div class="ttdoc">取得可读数据起止指针 </div><div class="ttdef"><b>Definition:</b> ringbuffer.c:136</div></div>
<div class="ttc" id="a00092_a89fdbed1466be114d8200405db2e18a5_html_a89fdbed1466be114d8200405db2e18a5"><div class="ttname"><a href="a00092_a89fdbed1466be114d8200405db2e18a5.html#a89fdbed1466be114d8200405db2e18a5">ringbuffer_copy</a></div><div class="ttdeci">uint32_t ringbuffer_copy(kringbuffer_t *rb, char *buffer, uint32_t size)</div><div class="ttdoc">读取但不清除 </div><div class="ttdef"><b>Definition:</b> ringbuffer.c:95</div></div>
<div class="ttc" id="a00092_ae50358352ded17ea670e926a59250cd0_html_ae50358352ded17ea670e926a59250cd0"><div class="ttname"><a href="a00092_ae50358352ded17ea670e926a59250cd0.html#ae50358352ded17ea670e926a59250cd0">ringbuffer_window_read_lock_size</a></div><div class="ttdeci">uint32_t ringbuffer_window_read_lock_size(kringbuffer_t *rb)</div><div class="ttdoc">虚拟窗口 - 取得非绕回连续地址的最大可读字节数 </div><div class="ttdef"><b>Definition:</b> ringbuffer.c:158</div></div>
<div class="ttc" id="a00092_acccb44d353cc569d1f39cf01125c88bf_html_acccb44d353cc569d1f39cf01125c88bf"><div class="ttname"><a href="a00092_acccb44d353cc569d1f39cf01125c88bf.html#acccb44d353cc569d1f39cf01125c88bf">ringbuffer_read</a></div><div class="ttdeci">uint32_t ringbuffer_read(kringbuffer_t *rb, char *buffer, uint32_t size)</div><div class="ttdoc">读取并清除 </div><div class="ttdef"><b>Definition:</b> ringbuffer.c:81</div></div>
<div class="ttc" id="a00034_html"><div class="ttname"><a href="a00034.html">_ringbuffer_t</a></div><div class="ttdef"><b>Definition:</b> ringbuffer.c:29</div></div>
<div class="ttc" id="a00092_a49e8fe0e7125070f1ff2bb05ea31b5f0_html_a49e8fe0e7125070f1ff2bb05ea31b5f0"><div class="ttname"><a href="a00092_a49e8fe0e7125070f1ff2bb05ea31b5f0.html#a49e8fe0e7125070f1ff2bb05ea31b5f0">ringbuffer_full</a></div><div class="ttdeci">int ringbuffer_full(kringbuffer_t *rb)</div><div class="ttdoc">满 </div><div class="ttdef"><b>Definition:</b> ringbuffer.c:230</div></div>
<div class="ttc" id="a00092_a92305d9585adf8fe35c059b04f635d30_html_a92305d9585adf8fe35c059b04f635d30"><div class="ttname"><a href="a00092_a92305d9585adf8fe35c059b04f635d30.html#a92305d9585adf8fe35c059b04f635d30">ringbuffer_write_commit</a></div><div class="ttdeci">void ringbuffer_write_commit(kringbuffer_t *rb, uint32_t size)</div><div class="ttdoc">提交成功写入的字节数 </div><div class="ttdef"><b>Definition:</b> ringbuffer.c:216</div></div>
<div class="ttc" id="a00092_a5d0caeccb61acafaa4c5148b697dd927_html_a5d0caeccb61acafaa4c5148b697dd927"><div class="ttname"><a href="a00092_a5d0caeccb61acafaa4c5148b697dd927.html#a5d0caeccb61acafaa4c5148b697dd927">ringbuffer_read_commit</a></div><div class="ttdeci">void ringbuffer_read_commit(kringbuffer_t *rb, uint32_t size)</div><div class="ttdoc">提交并清除已经读到的字节 </div><div class="ttdef"><b>Definition:</b> ringbuffer.c:144</div></div>
<div class="ttc" id="a00092_aa5b19df813e8df494a77c9a849ebffdd_html_aa5b19df813e8df494a77c9a849ebffdd"><div class="ttname"><a href="a00092_aa5b19df813e8df494a77c9a849ebffdd.html#aa5b19df813e8df494a77c9a849ebffdd">ringbuffer_write_lock_size</a></div><div class="ttdeci">uint32_t ringbuffer_write_lock_size(kringbuffer_t *rb)</div><div class="ttdoc">取得非绕回可连续写入的最大长度 </div><div class="ttdef"><b>Definition:</b> ringbuffer.c:193</div></div>
<div class="ttc" id="a00092_ab74775801f1ad149ac0beb37336f92e3_html_ab74775801f1ad149ac0beb37336f92e3"><div class="ttname"><a href="a00092_ab74775801f1ad149ac0beb37336f92e3.html#ab74775801f1ad149ac0beb37336f92e3">ringbuffer_eat_all</a></div><div class="ttdeci">int ringbuffer_eat_all(kringbuffer_t *rb)</div><div class="ttdoc">清除所有可读字节 </div><div class="ttdef"><b>Definition:</b> ringbuffer.c:56</div></div>
<div class="ttc" id="a00092_a2862a8ab39436df6e7db4f6e7f23acf2_html_a2862a8ab39436df6e7db4f6e7f23acf2"><div class="ttname"><a href="a00092_a2862a8ab39436df6e7db4f6e7f23acf2.html#a2862a8ab39436df6e7db4f6e7f23acf2">ringbuffer_get_max_size</a></div><div class="ttdeci">uint32_t ringbuffer_get_max_size(kringbuffer_t *rb)</div><div class="ttdoc">取得最大长度 </div><div class="ttdef"><b>Definition:</b> ringbuffer.c:240</div></div>
<div class="ttc" id="a00092_af34961f27369651af41a96f736a813af_html_af34961f27369651af41a96f736a813af"><div class="ttname"><a href="a00092_af34961f27369651af41a96f736a813af.html#af34961f27369651af41a96f736a813af">ringbuffer_write_lock_ptr</a></div><div class="ttdeci">char * ringbuffer_write_lock_ptr(kringbuffer_t *rb)</div><div class="ttdoc">取得可写起始指针 </div><div class="ttdef"><b>Definition:</b> ringbuffer.c:208</div></div>
<div class="ttc" id="a00092_a81244fe21f0b4fdcf45e66ae6257afaf_html_a81244fe21f0b4fdcf45e66ae6257afaf"><div class="ttname"><a href="a00092_a81244fe21f0b4fdcf45e66ae6257afaf.html#a81244fe21f0b4fdcf45e66ae6257afaf">ringbuffer_create</a></div><div class="ttdeci">kringbuffer_t * ringbuffer_create(uint32_t size)</div><div class="ttdoc">建立一个ringbuffer </div><div class="ttdef"><b>Definition:</b> ringbuffer.c:41</div></div>
<div class="ttc" id="a00092_a1ee13a66a33b0d5648d7c95b48bd6536_html_a1ee13a66a33b0d5648d7c95b48bd6536"><div class="ttname"><a href="a00092_a1ee13a66a33b0d5648d7c95b48bd6536.html#a1ee13a66a33b0d5648d7c95b48bd6536">ringbuffer_eat</a></div><div class="ttdeci">int ringbuffer_eat(kringbuffer_t *rb, uint32_t size)</div><div class="ttdoc">清除指定长度的可读字节 </div><div class="ttdef"><b>Definition:</b> ringbuffer.c:68</div></div>
<div class="ttc" id="a00092_a97a9944a61a5323f80fb07f0fa4d8ff5_html_a97a9944a61a5323f80fb07f0fa4d8ff5"><div class="ttname"><a href="a00092_a97a9944a61a5323f80fb07f0fa4d8ff5.html#a97a9944a61a5323f80fb07f0fa4d8ff5">ringbuffer_window_read_commit</a></div><div class="ttdeci">void ringbuffer_window_read_commit(kringbuffer_t *rb, uint32_t size)</div><div class="ttdoc">虚拟窗口 - 提交已经读到的字节，但不清除 </div><div class="ttdef"><b>Definition:</b> ringbuffer.c:184</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
生成于 2015年 七月 27日 星期一 14:33:19 , 为 knet使用  &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
